package com.example.demo.controller;


import com.example.custom.autoconfigure.service.CustomService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CustomController {

    Logger logger = LoggerFactory.getLogger(CustomController.class);
    CustomService customService;

    @Autowired
    public void setCustomService(CustomService customService) {
        this.customService = customService;
    }

    @GetMapping("/custom")
    public String custom(String name) {
        logger.debug("name:{}", name);
        return customService.doSomething(name);
    }
}
